<?php
function getNounByCount($singular, $plural, $count)
{
  // Get noun settings if exist
  $noun_settings = sfConfig::get('app_NounCount_' . strtolower($singular), null);

  // If no settings, return by count number
  if($noun_settings == null)
    return $count == 1 ? $singular : $plural;
  elseif($noun_settings['singular'] == null && $noun_settings['plural'] == null)
    return $count == 1 ? $singular : $plural;

  if(in_array($count, $noun_settings['singular']))
    return $singular;
  else
    return $plural;


  return $singular;
}

?>
